Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(material/bottom-sheet): changed after checked error with zoneless #29277

Merged
merged 1 commit into from
Jun 18, 2024

Conversation

crisbeto
Copy link
Member

Fixes that when closing and immediately reopening bottom sheet in a zoneless app, we were causing a "changed after checked" error to be thrown. It seems to be because we were calling detectChanges without marking for check first.

Fixes #29258.

Fixes that when closing and immediately reopening bottom sheet in a zoneless app, we were causing a "changed after checked" error to be thrown. It seems to be because we were calling `detectChanges` without marking for check first.

Fixes angular#29258.
@crisbeto crisbeto added the target: patch This PR is targeted for the next patch release label Jun 18, 2024
@crisbeto crisbeto requested a review from a team as a code owner June 18, 2024 07:14
@crisbeto crisbeto requested review from amysorto and mmalerba and removed request for a team June 18, 2024 07:14
@@ -92,15 +92,17 @@ export class MatBottomSheetContainer extends CdkDialogContainer implements OnDes
this._breakpointSubscription = breakpointObserver
.observe([Breakpoints.Medium, Breakpoints.Large, Breakpoints.XLarge])
.subscribe(() => {
this._toggleClass(
const classList = (this._elementRef.nativeElement as HTMLElement).classList;

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is unrelated to the fix, I just figured it's a good chance for a cleanup.

@crisbeto crisbeto removed the request for review from mmalerba June 18, 2024 19:26
@crisbeto crisbeto added the action: merge The PR is ready for merge by the caretaker label Jun 18, 2024
@crisbeto crisbeto merged commit aaea0e2 into angular:main Jun 18, 2024
23 of 25 checks passed
crisbeto added a commit that referenced this pull request Jun 18, 2024
…#29277)

Fixes that when closing and immediately reopening bottom sheet in a zoneless app, we were causing a "changed after checked" error to be thrown. It seems to be because we were calling `detectChanges` without marking for check first.

Fixes #29258.

(cherry picked from commit aaea0e2)
DBowen33 pushed a commit to DBowen33/components that referenced this pull request Jul 3, 2024
…angular#29277)

Fixes that when closing and immediately reopening bottom sheet in a zoneless app, we were causing a "changed after checked" error to be thrown. It seems to be because we were calling `detectChanges` without marking for check first.

Fixes angular#29258.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action: merge The PR is ready for merge by the caretaker target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug(MatBottomSheet): zoneless - Expression has changed after it was checked
2 participants